<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_onlinegroup.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.frame.util.PageTools" %>
<%
	request.setCharacterEncoding("UTF-8");
	Hashtable ti_onlineservice = new Hashtable();
	String req_group_name="";
	String req_group_type="";

	if(request.getParameter("req_group_name")!=null && !request.getParameter("req_group_name").equals("")){
		req_group_name = request.getParameter("req_group_name");
		ti_onlineservice.put("group_name",req_group_name);
	}
	
	if(request.getParameter("req_group_type")!=null && !request.getParameter("req_group_type").equals("")){
		req_group_type = request.getParameter("req_group_type");
		ti_onlineservice.put("group_type",req_group_type);
	}	

	Ti_onlinegroupInfo ti_onlineserviceInfo = new Ti_onlinegroupInfo();
	String iStart = "0";
	int limit = 20;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	List list = ti_onlineserviceInfo.getListByPage(ti_onlineservice,Integer.parseInt(iStart),limit);
	int counter = ti_onlineserviceInfo.getCountByObj(ti_onlineservice);
	String pageString = new PageTools().getGoogleToolsBar(counter,"index.jsp?iStart=",Integer.parseInt(iStart),limit);
%>
<html>
  <head>
    
    <title>在线客服组管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/commen.js"></script>
	<script type="text/javascript" src="index.js"></script>
</head>

<body>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td width="90%">
				<h1>在线客服组管理</h1>
			</td>
			<td>
				<a href="addInfo.jsp"><img src="/program/admin/index/images/post.gif" /></a>
			</td>
		</tr>
	</table>
	
	<form action="index.jsp" name="indexForm" method="post">
	  
	<table width="100%" cellpadding="0" cellspacing="0" class="dl_su">
		<tr>
			<td align="left" >
				
				
					组名:<input name="req_group_name" type="text" />&nbsp;
		  		
					组类型: <select name="req_group_type" >
						      <option value="">请选择</option> 
						      <option value="1">客服组</option>
						      <option value="2">律师组</option>
							  <option value="3">律所组</option>
						      </select>	
						  		
				<input name="searchInfo" type="button" value="搜索" onclick="return search();"/>	
			</td>
		</tr>
	</table>

	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	<% 
		int listsize = 0;
		if(list!=null && list.size()>0){
			listsize = list.size();
	%>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
				<input type="button" name="delInfo" onclick="delIndexInfo()" value="删除" class="buttab"/>
			</td>
			<td>
				总计:<%=counter %>条
			</td>
		</tr>
	</table>
	
	<table width="100%" cellpadding="1" cellspacing="1" class="listtab" border="0">
		<tr>
			<th width="5%" align="center"><input type="checkbox" name="checkall" id="checkall" onclick="selectAll()"></th>
		  	<th>组名</th>
		  	<th>组类型</th>
			<th width="10%">修改</th>
	  		<th width="10%">删除</th>
		</tr>
		
		
		<% 
		  		for(int i=0;i<list.size();i++){
		  			Hashtable map = (Hashtable)list.get(i);
		  			String group_id="",group_name="",group_type="";
	  			  	if(map.get("group_id")!=null) group_id = map.get("group_id").toString();
				  	if(map.get("group_name")!=null) group_name = map.get("group_name").toString();
				  	if(map.get("group_type")!=null) group_type = map.get("group_type").toString();
						

		  %>
		
		<tr>
			<td width="5%" align="center"><input type="checkbox" name="checkone<%=i %>" id="checkone<%=i %>" value="<%=group_id %>" /></td>
		  	<td><a href="updateInfo.jsp?group_id=<%=group_id %>"><%=group_name%></a></td>
		  	<td><%if(group_type.equals("1"))out.print("客服组");else if(group_type.equals("2"))out.print("律师组");else if(group_type.equals("3"))out.print("律所组");%></td>
			<td width="10%"><a href="updateInfo.jsp?group_id=<%=group_id %>"><img src="/program/admin/images/edit.gif" title="修改" /></a></td>
	  		<td width="10%"><a href="javascript:deleteOneInfo('<%=group_id%>','9897');"><img src="/program/admin/images/delete.gif" title="删除" /></a></a></td>
		</tr>
		
		  <%
		  		}
		  %>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
				<input type="button" name="delInfo" onclick="delIndexInfo()" value="删除" class="buttab"/>
			</td>
			<td>
				总计:<%=counter %>条
			</td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	<%
		 }
	%>
	
	  <input type="hidden" name="listsize" id="listsize" value="<%=listsize %>" />
	  <input type="hidden" name="pkid" id="pkid" value="" />
	  <input type="hidden" name="bpm_id" id="bpm_id" value="9897" />
	  </form>
</body>

</html>
